﻿package bdz.projects.lavender.cms.model
{
	
	/**
	 * ...
	 * @author ...
	 */
	public class ObjectData extends ObjectBase
	{
		public var parentHasWrite:Boolean;
		function ObjectData(xm:XML = null) {
			super(xm);
		}
		public function getPropertyWithName(nme:String):PropertyData{
			var ret:PropertyData;
			for each(var prop:PropertyData in _properties){
				if(prop.getAttribute("name") == nme){
					ret = prop;
				}
			}
			return ret;
		}
		public function getPropertyWithUI(ui:String):PropertyData{
			var ret:PropertyData;
			for each(var prop:PropertyData in _properties){
				if(prop.getAttribute("ui") == ui){
					ret = prop;
				}
			}
			return ret;
		}
		public function get properties():Array{
			return _properties;
		}
		
	}
	
}